package com.qijian.common.utils.sync;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;
import java.util.List;
/**
 * 一些特殊的金蝶同步合并操作归类
 *
 * @author gw
 */
@Component
public class KingDeeMergeOper extends BaseKingDee {
    /**
     * 核算后的计算成本价格
     * 简单领料，领料，补料，简单退料,退料
     */
    public List<JSONObject> costAmount(String tableName, String where) {
        String[] commonField = new String[]{"FID","FEntity_FEntryID", "FPrice", "FAmount"};
        String commonWhere = "FStockOrgId = 100121 AND FCancelStatus = 'A' AND (FPrice != 0 OR FAmount != 0)" +
                (StrUtil.isBlank(where) ? "" : AND + where);
        return getDataJson(tableName, commonField, commonWhere);
    }
}